package source

import org.apache.flink.api.common.serialization.SimpleStringSchema
import org.apache.flink.streaming.api.scala.StreamExecutionEnvironment

/**
  * @author dinghao 
  * @create 2021-09-09 9:55 
  * @message OK
  */
object FNcSource {
  def main(args: Array[String]): Unit = {
    val env = StreamExecutionEnvironment.getExecutionEnvironment
    val ncData = env.socketTextStream("192.168.1.193",9999)
    ncData.print()
    ncData.writeToSocket("192.168.1.193",9876,new SimpleStringSchema())
    env.execute("nc-nc")
  }
}
